﻿using Minotaur.App.Domains.Dto.Flow;
using Minotaur.App.Domains.Enum;
using Minotaur.App.Modules.FlowProcess.Control;
using ServiceStack;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using HandyControl.Controls;
using Minotaur.App.Modules.FlowProcess.ViewModels;

namespace Minotaur.App.Modules.FlowProcess.Views
{
    /// <summary>
    /// FowDesignView.xaml 的交互逻辑
    /// </summary>
    public partial class FowDesign : UserControl
    {
        public FowDesign()
        {
            InitializeComponent();
            CoverFlowMain.AddRange(new[]
                {
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a2.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpeg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a2.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpeg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a2.jpg"),
                    new Uri(@"pack://application:,,,/Minotaur.App.Modules.FlowProcess;component/Resources/Img/a1.jpeg"),
                });
            CoverFlowMain.PageIndex = 5;
            CoverFlowMain.Loop = true;
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            SideMenu sideMenu = new SideMenu();
            FowDesignViewModel viewModel = this.DataContext as FowDesignViewModel;
            viewModel.InitData(); 
        }

        private void OpendMenuClick(object sender, RoutedEventArgs e)
        {
            HandyControl.Controls.MessageBox.Success(e.OriginalSource.ToSafeJson());
        }
    }
}
